package com.vhall.component.controller.room.facade;

import com.vhall.component.entity.room.vo.*;
import com.vhall.component.entity.room.vo.IntroductionDetailReqVO;
import com.vhall.component.entity.room.vo.IntroductionDetailRspVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * 房间-app
 * @author guoxin.wang
 * @date 2021/7/12 17:30
 */
@FeignClient(value = "RoomApiFacade", path = "/v4/api/room")
public interface RoomApiFacade {

    /**
     * 获取房间属性信息
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @PostMapping(value = "/get-attributes")
    RoomAttrRespVO getAttributes(@Validated RoomAttrVO reqVO);

    /**
     * 开始直播推流接口
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @PostMapping(value = "/start-live")
    Boolean startLive(@Validated StartLiveVO reqVO);

    /**
     * 结束推流接口
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @PostMapping(value = "/end-live")
    Boolean endLive(@Validated EndLiveVO reqVO);

    /**
     * 创建直播
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/create")
    RoomRespVO create(@Validated AppRoomVO reqVO);

    /**
     * 直播间列表
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/list")
    AppRoomListRespVO list(@Validated AppRoomListReqVO reqVO);

    /**
     * 更新房间信息
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/update")
    Boolean update(@Validated AppRoomVO reqVO);

    /**
     * 在线检测
     *
     * @param reqVO
     * @return
     */
    @PostMapping(value = "/online-check")
    Map<String, Object> getOnlineCheck(@Validated OnlineCheckVO reqVO);

    /**
     * 根据房间号获取简介信息
     */
    @PostMapping("/detail")
    IntroductionDetailRspVO detail(@Validated IntroductionDetailReqVO introductionDetailReqVO);

}
